First-Class Relationships for Object-Orientated Programming Languages
نویسنده
چکیده
The object-oriented paradigm describes a powerful systemwhere complex systems can be modelled by a network of communicating objects. The object model is powerful because it appeals to our understanding of the world, yet it has serious shortcomings where the model doesn’t match our expectations. In particular, relationships are completely ignored by most object-oriented programming languages. Programmers must rely on error prone code using references which are a poor substitute for many of the complex relationships programs must represent. There have been several attempts to add relationships to the objectoriented paradigm and object-oriented design and object-oriented design and specification languages now include relationships, however there has been little progress made in adding relationships at the implementation level. We believe this is because existing attempts have not refined the object-orientedmodel, but simply added relationships to existing systems. In this proposal we present a prototype for a novel model of relationships in the object-oriented paradigm in which relationships, rather than objects, are the dominant constructs. This shift in focus allows programmers to gain more leverage from the object-oriented abstraction by bringing the language closer to the systems which are modelled. In addition, our model produces a stronger hierarchy than existing object-oriented systems which makes program decomposition easier and reduces coupling between objects.
منابع مشابه
Relations: Abstracting Object Collaborations
Allowing the description of a collection of objects, the concept of a “class” is central to object-oriented programming languages, yet, it is inadequate to describe the collaborations that arise from the interactions between these objects. The continued interest in concretizing object interactions — be it on the level of design through patterns, on the level of programming languages through fir...
متن کاملFirst-Class Relationships in Object Oriented Programs
Relationships have been an essential component of OO design since the 90s, yet mainstream OO languages still do not support first-class relationships. Most programs implement relationships in an ad-hoc fashion which results in unnecessarily complex code. We examine the requirements for a good first-class relationship abstraction and compare this with existing work. These requirements serve both...
متن کاملImplementing First Class Relationships in Java
Relationships have been an essential component of OO design since the 90s but OO languages still do not support firstclass relationships. Hence, programmers must implement relationships in an ad-hoc fashion which results in unnecessarily complex code. We have developed a new model for relationships in OO which distinguishes tuples and relationships (mutable sets of tuples) and supports both as ...
متن کاملAn Approach to Algebraic Semantics of Object-Oriented Languages
Studying the semantics of programming languages has a long tradition in computer science. Various approaches use various formalisms with various objectives. In the last two decades, algebraic specifications have frequently been used to study functional as well as imperative languages, and, in particular, object-orientated ones, thereby often focusing on specific aspects and concepts of this pro...
متن کاملFirst Class Relationships for OO Languages
Relationships have been an essential component of OO design since the 90s and, although several groups have attempted to rectify this, mainstream OO languages still do not support first-class relationships. This requires programmers to implement relationships in an ad-hoc fashion which results in unnecessarily complex code. We have developed a new model for relationships in OO which provides a ...
متن کامل